#ifndef RANDOM_ALLOCATION_H
#define RANDOM_ALLOCATION_H

#include "ns3/object.h"
#include "channel-allocation.h"

namespace ns3 {

/**
 * \ingroup sagin
 * \brief 随机信道分配算法
 */
class RandomAllocation : public ChannelAllocation
{
public:
    /**
     * \brief Get the TypeId
     * \return The TypeId
     */
    static TypeId GetTypeId();
    
    RandomAllocation();
    virtual ~RandomAllocation();
    
    // 实现纯虚函数
    virtual void LogAllocationResults() override;
    
protected:
    /**
     * 实现随机信道分配算法
     * \return 节点到信道的映射
     */
    virtual std::map<uint32_t, int> AllocateChannels();
};

} // namespace ns3

#endif /* RANDOM_ALLOCATION_H */
